﻿using Enyim.Caching;
using System.Web.Mvc;
using SilenthinkContract;
using Web.Areas.My.Models;
using SilenthinkCommon.Extension;

namespace Web.Areas.My.Controllers
{
    public class AuctionController : MyBaseController
    {
        public AuctionController(ILogService logService, IBaseService baseService, IExtraService extraService, IStoreService storeService, IOrderService orderService, IGameService gameService, IAuctionService auctionService, IPassportService passportService, IPaymentService paymentService, IMemcachedClient memcachedClient)
            : base(logService, baseService, extraService, storeService, orderService, gameService, auctionService, passportService, paymentService, memcachedClient)
        {

        }

        public ActionResult Index(int page = 1, int size = 20)
        {
            var identity = User.Identity.SkIdentity();
            var model = new AuctionControllerModel.Index();
            model.Orders = AuctionService.GetPagedAuctionOrder(page, size, identity.Id).ToPagedList(page, size);
            return View(model);
        }
    }
}
